From: Florian Müllner Date: Sat, 2 Mar 2013 15:22:49 +0000 (+0100) Subject: shellDBus: Export ShowOSD() method on the bus X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4586 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=90ea27c423fd6b4089ccb15057340d07518c785d;p=gnome-shell.git shellDBus: Export ShowOSD() method on the bus Export a simple method to trigger an OSD popup. gnome-settings-daemon will use this to replace its own OSD UI. https://bugzilla.gnome.org/show_bug.cgi?id=613543 --- diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js index 6657b35ee..1fc050052 100644 --- a/js/ui/shellDBus.js +++ b/js/ui/shellDBus.js @@ -20,6 +20,9 @@ const GnomeShellIface = + + + @@ -111,6 +114,21 @@ const GnomeShell = new Lang.Class({ return [success, returnValue]; }, + ShowOSD: function(params) { + for (let param in params) + params[param] = params[param].deep_unpack(); + + let icon = null; + if (params['icon']) + icon = Gio.Icon.new_for_string(params['icon']); + + Main.osdWindow.setIcon(icon); + Main.osdWindow.setLabel(params['label']); + Main.osdWindow.setLevel(params['level']); + + Main.osdWindow.show(); + }, + GrabAcceleratorAsync: function(params, invocation) { let [accel, flags] = params; let sender = invocation.get_sender();